vditor 3.10.9 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -209,6 +209,7 @@ Markdown 输出的 HTML 所展现的外观。内置 ant-design, light,dark,w
209
209
  | esc(value: string) | <kbd>esc</kbd> 按下后触发 | - |
210
210
  | ctrlEnter(value: string) | <kbd>⌘/ctrl+enter</kbd> 按下后触发 | - |
211
211
  | select(value: string) | 编辑器中选中文字后触发 | - |
212
+ | unSelect() | 编辑器中未选中文字后触发 | - |
212
213
  | tab | <kbd>tab</kbd> 键操作字符串,支持 `\t` 及任意字符串 | - |
213
214
  | typewriterMode | 是否启用打字机模式 | false |
214
215
  | cdn | 配置自建 CDN 地址 | `https://unpkg.com/vditor@${VDITOR_VERSION}` |
@@ -480,6 +481,7 @@ if (xhr.status === 200) {
480
481
  | handler(files: File[]) => string \| null \| Promise<string> \| Promise<null> | 自定义上传,当发生错误时返回错误信息 | - |
481
482
  | format(files: File[], responseText: string): string | 对服务端返回的数据进行转换,以满足内置的数据结构 | - |
482
483
  | file(files: File[]): File[] \| Promise<File[]> | 将上传的文件处理后再返回 | - |
484
+ | cancel(files: File[]): void | 取消正在上传的文件 | - |
483
485
  | setHeaders(): { [key: string]: string } | 上传前使用返回值设置头 | - |
484
486
  | extraData: { [key: string]: string \| Blob } | 为 FormData 添加额外的参数 | - |
485
487
  | multiple | 上传文件是否为多个 | true |
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vditor v3.10.9 - A markdown editor written in TypeScript.
2
+ * Vditor v3.11.0 - A markdown editor written in TypeScript.
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -25,7 +25,7 @@
25
25
  *
26
26
  */
27
27
  /*!
28
- * Vditor v3.10.9 - A markdown editor written in TypeScript.
28
+ * Vditor v3.11.0 - A markdown editor written in TypeScript.
29
29
  *
30
30
  * MIT License
31
31
  *
@@ -277,8 +277,9 @@
277
277
  z-index: 3;
278
278
  font-size: 14px;
279
279
  display: none;
280
- -moz-user-select: none;
281
- user-select: none;
280
+ -webkit-user-select: none;
281
+ -moz-user-select: none;
282
+ user-select: none;
282
283
  max-width: 320px;
283
284
  min-width: 80px;
284
285
  animation-duration: 0.15s;
@@ -599,8 +600,9 @@
599
600
  background-color: var(--count-background-color);
600
601
  border-radius: 3px;
601
602
  font-size: 12px;
602
- -moz-user-select: none;
603
- user-select: none;
603
+ -webkit-user-select: none;
604
+ -moz-user-select: none;
605
+ user-select: none;
604
606
  float: right;
605
607
  margin: 8px 3px 0 0;
606
608
  }
@@ -611,8 +613,9 @@
611
613
  .vditor-resize {
612
614
  padding: 3px 0;
613
615
  cursor: row-resize;
614
- -moz-user-select: none;
615
- user-select: none;
616
+ -webkit-user-select: none;
617
+ -moz-user-select: none;
618
+ user-select: none;
616
619
  position: absolute;
617
620
  width: 100%;
618
621
  }
@@ -722,8 +725,9 @@
722
725
  align-items: center;
723
726
  cursor: pointer;
724
727
  margin-left: 24px;
725
- -moz-user-select: none;
726
- user-select: none;
728
+ -webkit-user-select: none;
729
+ -moz-user-select: none;
730
+ user-select: none;
727
731
  color: var(--toolbar-icon-color);
728
732
  }
729
733
  .vditor-img__btn:hover {
@@ -1115,12 +1119,13 @@
1115
1119
  .vditor-linenumber__rows {
1116
1120
  position: absolute;
1117
1121
  pointer-events: none;
1118
- top: 0.5em;
1122
+ top: 1em;
1119
1123
  left: 0;
1120
1124
  width: 3em;
1121
1125
  /* works for line-numbers below 1000 lines */
1122
- -moz-user-select: none;
1123
- user-select: none;
1126
+ -webkit-user-select: none;
1127
+ -moz-user-select: none;
1128
+ user-select: none;
1124
1129
  counter-reset: linenumber;
1125
1130
  }
1126
1131
  .vditor-linenumber__rows > span {
@@ -1249,8 +1254,9 @@
1249
1254
  }
1250
1255
  .vditor-toc {
1251
1256
  margin-bottom: 16px;
1252
- -moz-user-select: text;
1253
- user-select: text;
1257
+ -webkit-user-select: text;
1258
+ -moz-user-select: text;
1259
+ user-select: text;
1254
1260
  color: #4285f4;
1255
1261
  }
1256
1262
  .vditor-toc .vditor-outline__action {